package com.doxiaopu.students.utils;

import java.util.UUID;

public class GetIdUtil {

    public String getId() {
        Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode();
        uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
        long timestamp = System.currentTimeMillis();
        String id = uuid+""+timestamp;
        System.err.print(id);
        return id;
    }
}
